﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<nelech.Models.DBModel.PuzzleTopic>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
נלך - רשימת חידות
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

      <h2>רשימת חידות</h2>

    <table>
        <tr>
            <th></th>
            <th>
               מס'
            </th>
            <th>
                תאריך
            </th>
            <th>
                כותרת
            </th>
            <th>
                תאריך פתרון
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("עריכה", "EditPuzzleTopic", new { id=item.id }) %> |
                <%= Html.ActionLink("למיחזור", "RecyclePuzzle", new { id = item.id })%>
                <%= Html.ActionLink("עריכת תגובות", "AdminlistFeedback", "Forum", new { id = item.id }, new object())%>
            </td>
            <td>
                <%= Html.Encode(item.id) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.date)) %>
            </td>
            <td>
                <%= Html.Encode(item.title) %>
            </td>
             <td>
                <%= Html.Encode(item.solutionDate) %>
            </td>
        </tr>
    
    <% } %>

    </table>
  

    <p>
        <%= Html.ActionLink("צור חדש", "CreatePuzzleTopic") %>
         <%= Html.ActionLink("סל מיחזור", "RecycleBinPuzzle")%>
         <%= Html.ActionLink("בחירת חידה", "ChoosePuzzle") %>
    </p>


</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

